package com.zues.thread.lock.eight;

/**
 * 资源类
 * @author zues
 * @date 12/22/2024 10:04 下午
 */
public class Phone {


    public static synchronized void sendMail(){
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("-----------------发邮件");
    }

    public synchronized void sendSMS(){
        System.out.println("-----------------发短信");
    }

    public void hello(){
        System.out.println("hello");
    }

}
